package controles.interfaz;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.console.MessageConsole;
import org.eclipse.ui.console.MessageConsoleStream;

public class Consola extends MessageConsole {
	private MessageConsoleStream outMessageStream;
	private MessageConsoleStream inMessageStream;

	public Consola() {
	    super("Consola", null);
	    outMessageStream = newMessageStream();
	    outMessageStream.setColor(Display.getCurrent().getSystemColor(
	        SWT.COLOR_BLUE));	    
	    inMessageStream = newMessageStream();
	    inMessageStream.setColor(Display.getCurrent().getSystemColor(
	        SWT.COLOR_RED));	   	    
	  }

	  protected void dispose() {
	    
	  }
	  
	  public void imprime(String mensaje){
		  outMessageStream.println(mensaje);		  
	  }
}
